Fix CLI template issues and remove AI/MCP/MCPClient templates#2904
Open
heyitsaamir wants to merge 2 commits into
Open
Fix CLI template issues and remove AI/MCP/MCPClient templates#2904heyitsaamir wants to merge 2 commits into
heyitsaamir wants to merge 2 commits into
Conversation
Remove the ai, mcp, and mcpclient TypeScript templates (the mcp package.json contained invalid JSON and the ai AGENTS.md linked to a dead URL). Fix remaining templates: - graph (TS): declare missing @microsoft/teams.api dependency - tab (TS): declare missing @microsoft/teams-js and @microsoft/teams.common dependencies; rename leftover @tests/tab loggers; await reply() - graph (Python): fix possibly-unbound 'me'; align dotenv pin - python READMEs: drop nonexistent apppackage/ reference - update listTemplates mock in menu-loop test Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Cleans up CLI scaffolding templates by removing broken TS AI/MCP templates and fixing dependency/runtime/docs issues in the remaining templates so generated projects build/run correctly.
Changes:
- Remove
typescript/ai,typescript/mcp,typescript/mcpclienttemplates (invalid/buggy scaffold outputs). - Fix TS
graph/tabtemplates (missing deps; logger name cleanup; awaitreply()in tab bot handler). - Fix Python
graphtemplate (avoid possibly-unboundme; align dotenv pin) and remove stale README references toapppackage/.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/cli/tests/menu-loop.test.ts | Updates mocked template list to match removed templates. |
| packages/cli/templates/typescript/tab/src/Tab/App.tsx | Renames logger source to non-internal tab. |
| packages/cli/templates/typescript/tab/src/index.ts | Renames logger + awaits reply() for correct async handling. |
| packages/cli/templates/typescript/tab/package.json.hbs | Adds missing runtime deps (@microsoft/teams-js, @microsoft/teams.common). |
| packages/cli/templates/typescript/graph/package.json.hbs | Adds missing @microsoft/teams.api dependency used by template code. |
| packages/cli/templates/python/graph/src/main.py | Initializes me to avoid unbound usage when user_graph is absent. |
| packages/cli/templates/python/graph/README.md | Removes incorrect apppackage/ directory reference. |
| packages/cli/templates/python/graph/pyproject.toml.hbs | Pins dotenv dependency (now consistent with echo template). |
| packages/cli/templates/python/echo/README.md | Removes incorrect apppackage/ directory reference. |
| packages/cli/templates/typescript/ai/AGENTS.md | Deletes removed template content. |
| packages/cli/templates/typescript/ai/package.json.hbs | Deletes removed template content. |
| packages/cli/templates/typescript/ai/src/index.ts | Deletes removed template content. |
| packages/cli/templates/typescript/ai/tsconfig.json | Deletes removed template content. |
| packages/cli/templates/typescript/ai/tsup.config.js | Deletes removed template content. |
| packages/cli/templates/typescript/mcp/package.json.hbs | Deletes removed template content. |
| packages/cli/templates/typescript/mcp/src/index.ts.hbs | Deletes removed template content. |
| packages/cli/templates/typescript/mcp/tsconfig.json | Deletes removed template content. |
| packages/cli/templates/typescript/mcp/tsup.config.js | Deletes removed template content. |
| packages/cli/templates/typescript/mcpclient/package.json.hbs | Deletes removed template content. |
| packages/cli/templates/typescript/mcpclient/src/index.ts.hbs | Deletes removed template content. |
| packages/cli/templates/typescript/mcpclient/tsconfig.json | Deletes removed template content. |
| packages/cli/templates/typescript/mcpclient/tsup.config.js | Deletes removed template content. |
Comment on lines
8
to
11
| "microsoft-teams-apps", | ||
| "microsoft-teams-graph", | ||
| "dotenv" | ||
| "dotenv>=0.9.9" | ||
| ] |
…emplates Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Review of the CLI scaffolding templates surfaced several issues. This PR removes three problematic templates and fixes the rest.
Removed templates
typescript/ai— itsAGENTS.mdlinked to a dead URL (microsoft/teams.ts/main/AGENTS_TEMPLATE.mdreturns 404).typescript/mcp— itspackage.json.hbsinspectscript contained a literal newline, making the generatedpackage.jsoninvalid JSON (every npm command in a scaffolded project would break).typescript/mcpclient— removed alongside the MCP set.Fixes to remaining templates
@microsoft/teams.apidependency (imported forMessageActivity).@microsoft/teams-jsand@microsoft/teams.commondependencies; renamed leftover internal@tests/tablogger names totab; awaited thereply()call in the echo handler.me(now initialized toNonebefore theif graph:block) so pyright and runtime don't fail whenuser_graphisNone; aligned thedotenvpin with the echo template.apppackage/directory.listTemplatesmock to['echo', 'graph', 'tab'].Template names are discovered dynamically from the filesystem via
listTemplates(), so removing the directories is sufficient — no command code references them by name.Validation
package.json.hbsfiles are valid JSON; every import is now a declared dependency.npm run buildpasses.